package com.esri.core.internal.value;

import com.esri.core.geometry.Envelope;
import com.esri.core.geometry.SpatialReference;
import org.codehaus.jackson.JsonParser;
import org.codehaus.jackson.JsonToken;

/* loaded from: classes.dex */
public class c {
    private String a;
    private String b;
    private SpatialReference c;
    private Envelope d;
    private String e;
    private int f;
    private String g;
    private String h;
    private float i;
    private boolean j;

    c() {
    }

    public String a() {
        return this.a;
    }

    public String b() {
        return this.b;
    }

    public SpatialReference c() {
        return this.c;
    }

    public Envelope d() {
        return this.d;
    }

    public String e() {
        return this.e;
    }

    public int f() {
        return this.f;
    }

    public String g() {
        return this.g;
    }

    public float h() {
        return this.i;
    }

    public boolean i() {
        return this.j;
    }

    public static c a(JsonParser jsonParser) throws Exception {
        if (com.esri.core.internal.util.d.c(jsonParser)) {
            c cVar = new c();
            while (jsonParser.nextToken() != JsonToken.END_OBJECT) {
                String currentName = jsonParser.getCurrentName();
                jsonParser.nextToken();
                if ("balloonStyleText".equals(currentName)) {
                    cVar.a = jsonParser.getText();
                } else if ("description".equals(currentName)) {
                    cVar.b = jsonParser.getText();
                } else if ("extent".equals(currentName)) {
                    if (!com.esri.core.internal.util.d.c(jsonParser)) {
                        jsonParser.skipChildren();
                    } else {
                        Envelope envelope = new Envelope();
                        while (jsonParser.nextToken() != JsonToken.END_OBJECT) {
                            String currentName2 = jsonParser.getCurrentName();
                            jsonParser.nextToken();
                            if ("spatialReference".equals(currentName2)) {
                                cVar.c = SpatialReference.fromJson(jsonParser);
                            } else if ("xmax".equals(currentName2)) {
                                envelope.setXMax(jsonParser.getDoubleValue());
                            } else if ("xmin".equals(currentName2)) {
                                envelope.setXMin(jsonParser.getDoubleValue());
                            } else if ("ymax".equals(currentName2)) {
                                envelope.setYMax(jsonParser.getDoubleValue());
                            } else if ("ymin".equals(currentName2)) {
                                envelope.setYMin(jsonParser.getDoubleValue());
                            } else {
                                jsonParser.skipChildren();
                            }
                        }
                        cVar.d = envelope;
                    }
                } else if ("href".equals(currentName)) {
                    cVar.e = jsonParser.getText();
                } else if ("id".equals(currentName)) {
                    cVar.f = jsonParser.getIntValue();
                } else if ("name".equals(currentName)) {
                    cVar.g = jsonParser.getText();
                } else if ("rotation".equals(currentName)) {
                    cVar.i = jsonParser.getFloatValue();
                } else if ("snippet".equals(currentName)) {
                    if (jsonParser.getCurrentToken() != JsonToken.VALUE_NULL) {
                        cVar.h = jsonParser.getText();
                    }
                } else if ("visibility".equals(currentName)) {
                    cVar.j = jsonParser.getIntValue() > 0;
                }
            }
            return cVar;
        }
        return null;
    }
}
